//
//  AXFJoinController.m
//  BEEQUICK
//
//  Created by Joker on 2016/11/24.
//  Copyright © 2016年 SevenGroup. All rights reserved.
//

#import "AXFJoinController.h"
#import "AXFWhiteNavView.h"

@interface AXFJoinController ()<AXFWhiteNavViewDelegate>

@end

@implementation AXFJoinController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
}

- (void)setupUI{
    
    AXFWhiteNavView *whiteNavView = [[AXFWhiteNavView alloc] init];
    
    whiteNavView.delegate = self;
    
    [whiteNavView setTitleName:@"加盟合作" andFunctionName:@"客服电话"];
    
    [self.view addSubview:whiteNavView];
    
    [whiteNavView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.offset(0);
        make.height.mas_equalTo(kNAVBARH + 20);
    }];

    UIWebView * webView = [[UIWebView alloc]init];
    
    [self.view addSubview:webView];
    
    [webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.offset(0);
        make.top.equalTo(whiteNavView.mas_bottom);
    }];
    
    NSURL * url = [NSURL URLWithString:@"http://m.beequick.cn/show/join?city_id=0&__d=d14ryS1bFkB0dOBn%2Bvd9GDn55g34BaxSwQk6PAIdxaUcOZK4qZM5HpDIlnwAZPd5UyoGAl5VrxjtgyH%2BUIXSPx7xiqyZzr%2BX30w3rvb6iWSLsoO4aQnOrM%2BKqEZ7x14eK17f&__v=ios5.9&location_hash=9a1327eQtmYl3olhA5wQBFCEHhCBhJONjmya/9%2Bxz0xtmQXD4DlynMLX4AMcP2Tki9MUX/QZ2e/necj6VHtA&zchtauth=e2ce4bEoDMWWB15V98ApGBX150AVjnGXVN7pv7sV4WbS9fEQ&timestamp=1479987031983319&token=222f92ef2ba0b2f15c6f38c4dcbc47cc&mac=8785162177afc21a25597f7cf01dd25d"];
    
    NSURLRequest * request = [NSURLRequest requestWithURL:url];
    
    [webView loadRequest:request];


}

- (void)backToViewController
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
